package org.xmdl.parser.antlr.internal; 

import java.io.InputStream;
import org.eclipse.xtext.*;
import org.eclipse.xtext.parser.*;
import org.eclipse.xtext.parser.impl.*;
import org.eclipse.xtext.parsetree.*;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
import org.eclipse.xtext.conversion.ValueConverterException;
import org.xmdl.services.SilkGrammarAccess;



import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

public class InternalSilkParser extends AbstractInternalAntlrParser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_ID", "RULE_INT", "RULE_TERM_DOUBLE", "RULE_STRING", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'('", "','", "')'", "'{'", "'}'", "'='", "'print'", "'return'", "'+'", "'-'", "'*'", "'/'"
    };
    public static final int RULE_ID=4;
    public static final int RULE_STRING=7;
    public static final int RULE_ANY_OTHER=11;
    public static final int RULE_INT=5;
    public static final int RULE_WS=10;
    public static final int RULE_SL_COMMENT=9;
    public static final int EOF=-1;
    public static final int RULE_TERM_DOUBLE=6;
    public static final int RULE_ML_COMMENT=8;

        public InternalSilkParser(TokenStream input) {
            super(input);
        }
        

    public String[] getTokenNames() { return tokenNames; }
    public String getGrammarFileName() { return "../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g"; }


     
     	private SilkGrammarAccess grammarAccess;
     	
        public InternalSilkParser(TokenStream input, IAstFactory factory, SilkGrammarAccess grammarAccess) {
            this(input);
            this.factory = factory;
            registerRules(grammarAccess.getGrammar());
            this.grammarAccess = grammarAccess;
        }
        
        @Override
        protected InputStream getTokenFile() {
        	ClassLoader classLoader = getClass().getClassLoader();
        	return classLoader.getResourceAsStream("org/xmdl/parser/antlr/internal/InternalSilk.tokens");
        }
        
        @Override
        protected String getFirstRuleName() {
        	return "Program";	
       	} 



    // $ANTLR start entryRuleProgram
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:72:1: entryRuleProgram returns [EObject current=null] : iv_ruleProgram= ruleProgram EOF ;
    public final EObject entryRuleProgram() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleProgram = null;


        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:72:49: (iv_ruleProgram= ruleProgram EOF )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:73:2: iv_ruleProgram= ruleProgram EOF
            {
             currentNode = createCompositeNode(grammarAccess.getProgramRule(), currentNode); 
            pushFollow(FOLLOW_ruleProgram_in_entryRuleProgram73);
            iv_ruleProgram=ruleProgram();
            _fsp--;

             current =iv_ruleProgram; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleProgram83); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end entryRuleProgram


    // $ANTLR start ruleProgram
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:80:1: ruleProgram returns [EObject current=null] : ( (lv_methods_0= ruleMethod )* (lv_statements_1= ruleStatement )* ) ;
    public final EObject ruleProgram() throws RecognitionException {
        EObject current = null;

        EObject lv_methods_0 = null;

        EObject lv_statements_1 = null;


         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:85:6: ( ( (lv_methods_0= ruleMethod )* (lv_statements_1= ruleStatement )* ) )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:86:1: ( (lv_methods_0= ruleMethod )* (lv_statements_1= ruleStatement )* )
            {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:86:1: ( (lv_methods_0= ruleMethod )* (lv_statements_1= ruleStatement )* )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:86:2: (lv_methods_0= ruleMethod )* (lv_statements_1= ruleStatement )*
            {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:86:2: (lv_methods_0= ruleMethod )*
            loop1:
            do {
                int alt1=2;
                alt1 = dfa1.predict(input);
                switch (alt1) {
            	case 1 :
            	    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:89:6: lv_methods_0= ruleMethod
            	    {
            	     
            	    	        currentNode=createCompositeNode(grammarAccess.getProgramAccess().getMethodsMethodParserRuleCall_0_0(), currentNode); 
            	    	    
            	    pushFollow(FOLLOW_ruleMethod_in_ruleProgram142);
            	    lv_methods_0=ruleMethod();
            	    _fsp--;


            	    	        if (current==null) {
            	    	            current = factory.create(grammarAccess.getProgramRule().getType().getClassifier());
            	    	            associateNodeWithAstElement(currentNode.getParent(), current);
            	    	        }
            	    	        
            	    	        try {
            	    	       		add(current, "methods", lv_methods_0, "Method", currentNode);
            	    	        } catch (ValueConverterException vce) {
            	    				handleValueConverterException(vce);
            	    	        }
            	    	        currentNode = currentNode.getParent();
            	    	    

            	    }
            	    break;

            	default :
            	    break loop1;
                }
            } while (true);

            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:107:3: (lv_statements_1= ruleStatement )*
            loop2:
            do {
                int alt2=2;
                int LA2_0 = input.LA(1);

                if ( (LA2_0==RULE_ID||(LA2_0>=18 && LA2_0<=19)) ) {
                    alt2=1;
                }


                switch (alt2) {
            	case 1 :
            	    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:110:6: lv_statements_1= ruleStatement
            	    {
            	     
            	    	        currentNode=createCompositeNode(grammarAccess.getProgramAccess().getStatementsStatementParserRuleCall_1_0(), currentNode); 
            	    	    
            	    pushFollow(FOLLOW_ruleStatement_in_ruleProgram181);
            	    lv_statements_1=ruleStatement();
            	    _fsp--;


            	    	        if (current==null) {
            	    	            current = factory.create(grammarAccess.getProgramRule().getType().getClassifier());
            	    	            associateNodeWithAstElement(currentNode.getParent(), current);
            	    	        }
            	    	        
            	    	        try {
            	    	       		add(current, "statements", lv_statements_1, "Statement", currentNode);
            	    	        } catch (ValueConverterException vce) {
            	    				handleValueConverterException(vce);
            	    	        }
            	    	        currentNode = currentNode.getParent();
            	    	    

            	    }
            	    break;

            	default :
            	    break loop2;
                }
            } while (true);


            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleProgram


    // $ANTLR start entryRuleMethod
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:135:1: entryRuleMethod returns [EObject current=null] : iv_ruleMethod= ruleMethod EOF ;
    public final EObject entryRuleMethod() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleMethod = null;


        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:135:48: (iv_ruleMethod= ruleMethod EOF )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:136:2: iv_ruleMethod= ruleMethod EOF
            {
             currentNode = createCompositeNode(grammarAccess.getMethodRule(), currentNode); 
            pushFollow(FOLLOW_ruleMethod_in_entryRuleMethod219);
            iv_ruleMethod=ruleMethod();
            _fsp--;

             current =iv_ruleMethod; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleMethod229); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end entryRuleMethod


    // $ANTLR start ruleMethod
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:143:1: ruleMethod returns [EObject current=null] : ( (lv_name_0= RULE_ID ) '(' ( (lv_parameters_2= ruleVariable ) ( ',' (lv_parameters_4= ruleVariable ) )* )? ')' '{' (lv_statements_7= ruleStatement )* '}' ) ;
    public final EObject ruleMethod() throws RecognitionException {
        EObject current = null;

        Token lv_name_0=null;
        EObject lv_parameters_2 = null;

        EObject lv_parameters_4 = null;

        EObject lv_statements_7 = null;


         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:148:6: ( ( (lv_name_0= RULE_ID ) '(' ( (lv_parameters_2= ruleVariable ) ( ',' (lv_parameters_4= ruleVariable ) )* )? ')' '{' (lv_statements_7= ruleStatement )* '}' ) )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:149:1: ( (lv_name_0= RULE_ID ) '(' ( (lv_parameters_2= ruleVariable ) ( ',' (lv_parameters_4= ruleVariable ) )* )? ')' '{' (lv_statements_7= ruleStatement )* '}' )
            {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:149:1: ( (lv_name_0= RULE_ID ) '(' ( (lv_parameters_2= ruleVariable ) ( ',' (lv_parameters_4= ruleVariable ) )* )? ')' '{' (lv_statements_7= ruleStatement )* '}' )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:149:2: (lv_name_0= RULE_ID ) '(' ( (lv_parameters_2= ruleVariable ) ( ',' (lv_parameters_4= ruleVariable ) )* )? ')' '{' (lv_statements_7= ruleStatement )* '}'
            {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:149:2: (lv_name_0= RULE_ID )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:151:6: lv_name_0= RULE_ID
            {
            lv_name_0=(Token)input.LT(1);
            match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleMethod276); 

            		createLeafNode(grammarAccess.getMethodAccess().getNameIDTerminalRuleCall_0_0(), "name"); 
            	

            	        if (current==null) {
            	            current = factory.create(grammarAccess.getMethodRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode, current);
            	        }
            	        
            	        try {
            	       		set(current, "name", lv_name_0, "ID", lastConsumedNode);
            	        } catch (ValueConverterException vce) {
            				handleValueConverterException(vce);
            	        }
            	    

            }

            match(input,12,FOLLOW_12_in_ruleMethod293); 

                    createLeafNode(grammarAccess.getMethodAccess().getLeftParenthesisKeyword_1(), null); 
                
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:173:1: ( (lv_parameters_2= ruleVariable ) ( ',' (lv_parameters_4= ruleVariable ) )* )?
            int alt4=2;
            int LA4_0 = input.LA(1);

            if ( (LA4_0==RULE_ID) ) {
                alt4=1;
            }
            switch (alt4) {
                case 1 :
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:173:2: (lv_parameters_2= ruleVariable ) ( ',' (lv_parameters_4= ruleVariable ) )*
                    {
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:173:2: (lv_parameters_2= ruleVariable )
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:176:6: lv_parameters_2= ruleVariable
                    {
                     
                    	        currentNode=createCompositeNode(grammarAccess.getMethodAccess().getParametersVariableParserRuleCall_2_0_0(), currentNode); 
                    	    
                    pushFollow(FOLLOW_ruleVariable_in_ruleMethod328);
                    lv_parameters_2=ruleVariable();
                    _fsp--;


                    	        if (current==null) {
                    	            current = factory.create(grammarAccess.getMethodRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode.getParent(), current);
                    	        }
                    	        
                    	        try {
                    	       		add(current, "parameters", lv_parameters_2, "Variable", currentNode);
                    	        } catch (ValueConverterException vce) {
                    				handleValueConverterException(vce);
                    	        }
                    	        currentNode = currentNode.getParent();
                    	    

                    }

                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:194:2: ( ',' (lv_parameters_4= ruleVariable ) )*
                    loop3:
                    do {
                        int alt3=2;
                        int LA3_0 = input.LA(1);

                        if ( (LA3_0==13) ) {
                            alt3=1;
                        }


                        switch (alt3) {
                    	case 1 :
                    	    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:194:3: ',' (lv_parameters_4= ruleVariable )
                    	    {
                    	    match(input,13,FOLLOW_13_in_ruleMethod342); 

                    	            createLeafNode(grammarAccess.getMethodAccess().getCommaKeyword_2_1_0(), null); 
                    	        
                    	    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:198:1: (lv_parameters_4= ruleVariable )
                    	    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:201:6: lv_parameters_4= ruleVariable
                    	    {
                    	     
                    	    	        currentNode=createCompositeNode(grammarAccess.getMethodAccess().getParametersVariableParserRuleCall_2_1_1_0(), currentNode); 
                    	    	    
                    	    pushFollow(FOLLOW_ruleVariable_in_ruleMethod376);
                    	    lv_parameters_4=ruleVariable();
                    	    _fsp--;


                    	    	        if (current==null) {
                    	    	            current = factory.create(grammarAccess.getMethodRule().getType().getClassifier());
                    	    	            associateNodeWithAstElement(currentNode.getParent(), current);
                    	    	        }
                    	    	        
                    	    	        try {
                    	    	       		add(current, "parameters", lv_parameters_4, "Variable", currentNode);
                    	    	        } catch (ValueConverterException vce) {
                    	    				handleValueConverterException(vce);
                    	    	        }
                    	    	        currentNode = currentNode.getParent();
                    	    	    

                    	    }


                    	    }
                    	    break;

                    	default :
                    	    break loop3;
                        }
                    } while (true);


                    }
                    break;

            }

            match(input,14,FOLLOW_14_in_ruleMethod393); 

                    createLeafNode(grammarAccess.getMethodAccess().getRightParenthesisKeyword_3(), null); 
                
            match(input,15,FOLLOW_15_in_ruleMethod402); 

                    createLeafNode(grammarAccess.getMethodAccess().getLeftCurlyBracketKeyword_4(), null); 
                
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:227:1: (lv_statements_7= ruleStatement )*
            loop5:
            do {
                int alt5=2;
                int LA5_0 = input.LA(1);

                if ( (LA5_0==RULE_ID||(LA5_0>=18 && LA5_0<=19)) ) {
                    alt5=1;
                }


                switch (alt5) {
            	case 1 :
            	    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:230:6: lv_statements_7= ruleStatement
            	    {
            	     
            	    	        currentNode=createCompositeNode(grammarAccess.getMethodAccess().getStatementsStatementParserRuleCall_5_0(), currentNode); 
            	    	    
            	    pushFollow(FOLLOW_ruleStatement_in_ruleMethod436);
            	    lv_statements_7=ruleStatement();
            	    _fsp--;


            	    	        if (current==null) {
            	    	            current = factory.create(grammarAccess.getMethodRule().getType().getClassifier());
            	    	            associateNodeWithAstElement(currentNode.getParent(), current);
            	    	        }
            	    	        
            	    	        try {
            	    	       		add(current, "statements", lv_statements_7, "Statement", currentNode);
            	    	        } catch (ValueConverterException vce) {
            	    				handleValueConverterException(vce);
            	    	        }
            	    	        currentNode = currentNode.getParent();
            	    	    

            	    }
            	    break;

            	default :
            	    break loop5;
                }
            } while (true);

            match(input,16,FOLLOW_16_in_ruleMethod450); 

                    createLeafNode(grammarAccess.getMethodAccess().getRightCurlyBracketKeyword_6(), null); 
                

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleMethod


    // $ANTLR start entryRuleStatement
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:259:1: entryRuleStatement returns [EObject current=null] : iv_ruleStatement= ruleStatement EOF ;
    public final EObject entryRuleStatement() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleStatement = null;


        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:259:51: (iv_ruleStatement= ruleStatement EOF )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:260:2: iv_ruleStatement= ruleStatement EOF
            {
             currentNode = createCompositeNode(grammarAccess.getStatementRule(), currentNode); 
            pushFollow(FOLLOW_ruleStatement_in_entryRuleStatement483);
            iv_ruleStatement=ruleStatement();
            _fsp--;

             current =iv_ruleStatement; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleStatement493); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end entryRuleStatement


    // $ANTLR start ruleStatement
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:267:1: ruleStatement returns [EObject current=null] : (this_Assignment_0= ruleAssignment | this_PrintStatement_1= rulePrintStatement | this_Invocation_2= ruleInvocation | this_ReturnStatement_3= ruleReturnStatement ) ;
    public final EObject ruleStatement() throws RecognitionException {
        EObject current = null;

        EObject this_Assignment_0 = null;

        EObject this_PrintStatement_1 = null;

        EObject this_Invocation_2 = null;

        EObject this_ReturnStatement_3 = null;


         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:272:6: ( (this_Assignment_0= ruleAssignment | this_PrintStatement_1= rulePrintStatement | this_Invocation_2= ruleInvocation | this_ReturnStatement_3= ruleReturnStatement ) )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:273:1: (this_Assignment_0= ruleAssignment | this_PrintStatement_1= rulePrintStatement | this_Invocation_2= ruleInvocation | this_ReturnStatement_3= ruleReturnStatement )
            {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:273:1: (this_Assignment_0= ruleAssignment | this_PrintStatement_1= rulePrintStatement | this_Invocation_2= ruleInvocation | this_ReturnStatement_3= ruleReturnStatement )
            int alt6=4;
            switch ( input.LA(1) ) {
            case RULE_ID:
                {
                int LA6_1 = input.LA(2);

                if ( (LA6_1==12) ) {
                    alt6=3;
                }
                else if ( (LA6_1==17) ) {
                    alt6=1;
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("273:1: (this_Assignment_0= ruleAssignment | this_PrintStatement_1= rulePrintStatement | this_Invocation_2= ruleInvocation | this_ReturnStatement_3= ruleReturnStatement )", 6, 1, input);

                    throw nvae;
                }
                }
                break;
            case 18:
                {
                alt6=2;
                }
                break;
            case 19:
                {
                alt6=4;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("273:1: (this_Assignment_0= ruleAssignment | this_PrintStatement_1= rulePrintStatement | this_Invocation_2= ruleInvocation | this_ReturnStatement_3= ruleReturnStatement )", 6, 0, input);

                throw nvae;
            }

            switch (alt6) {
                case 1 :
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:274:5: this_Assignment_0= ruleAssignment
                    {
                     
                            currentNode=createCompositeNode(grammarAccess.getStatementAccess().getAssignmentParserRuleCall_0(), currentNode); 
                        
                    pushFollow(FOLLOW_ruleAssignment_in_ruleStatement540);
                    this_Assignment_0=ruleAssignment();
                    _fsp--;

                     
                            current = this_Assignment_0; 
                            currentNode = currentNode.getParent();
                        

                    }
                    break;
                case 2 :
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:284:5: this_PrintStatement_1= rulePrintStatement
                    {
                     
                            currentNode=createCompositeNode(grammarAccess.getStatementAccess().getPrintStatementParserRuleCall_1(), currentNode); 
                        
                    pushFollow(FOLLOW_rulePrintStatement_in_ruleStatement567);
                    this_PrintStatement_1=rulePrintStatement();
                    _fsp--;

                     
                            current = this_PrintStatement_1; 
                            currentNode = currentNode.getParent();
                        

                    }
                    break;
                case 3 :
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:294:5: this_Invocation_2= ruleInvocation
                    {
                     
                            currentNode=createCompositeNode(grammarAccess.getStatementAccess().getInvocationParserRuleCall_2(), currentNode); 
                        
                    pushFollow(FOLLOW_ruleInvocation_in_ruleStatement594);
                    this_Invocation_2=ruleInvocation();
                    _fsp--;

                     
                            current = this_Invocation_2; 
                            currentNode = currentNode.getParent();
                        

                    }
                    break;
                case 4 :
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:304:5: this_ReturnStatement_3= ruleReturnStatement
                    {
                     
                            currentNode=createCompositeNode(grammarAccess.getStatementAccess().getReturnStatementParserRuleCall_3(), currentNode); 
                        
                    pushFollow(FOLLOW_ruleReturnStatement_in_ruleStatement621);
                    this_ReturnStatement_3=ruleReturnStatement();
                    _fsp--;

                     
                            current = this_ReturnStatement_3; 
                            currentNode = currentNode.getParent();
                        

                    }
                    break;

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleStatement


    // $ANTLR start entryRuleAssignment
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:319:1: entryRuleAssignment returns [EObject current=null] : iv_ruleAssignment= ruleAssignment EOF ;
    public final EObject entryRuleAssignment() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleAssignment = null;


        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:319:52: (iv_ruleAssignment= ruleAssignment EOF )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:320:2: iv_ruleAssignment= ruleAssignment EOF
            {
             currentNode = createCompositeNode(grammarAccess.getAssignmentRule(), currentNode); 
            pushFollow(FOLLOW_ruleAssignment_in_entryRuleAssignment653);
            iv_ruleAssignment=ruleAssignment();
            _fsp--;

             current =iv_ruleAssignment; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleAssignment663); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end entryRuleAssignment


    // $ANTLR start ruleAssignment
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:327:1: ruleAssignment returns [EObject current=null] : ( (lv_variable_0= ruleVariable ) '=' (lv_value_2= ruleValueItem ) ) ;
    public final EObject ruleAssignment() throws RecognitionException {
        EObject current = null;

        EObject lv_variable_0 = null;

        EObject lv_value_2 = null;


         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:332:6: ( ( (lv_variable_0= ruleVariable ) '=' (lv_value_2= ruleValueItem ) ) )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:333:1: ( (lv_variable_0= ruleVariable ) '=' (lv_value_2= ruleValueItem ) )
            {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:333:1: ( (lv_variable_0= ruleVariable ) '=' (lv_value_2= ruleValueItem ) )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:333:2: (lv_variable_0= ruleVariable ) '=' (lv_value_2= ruleValueItem )
            {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:333:2: (lv_variable_0= ruleVariable )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:336:6: lv_variable_0= ruleVariable
            {
             
            	        currentNode=createCompositeNode(grammarAccess.getAssignmentAccess().getVariableVariableParserRuleCall_0_0(), currentNode); 
            	    
            pushFollow(FOLLOW_ruleVariable_in_ruleAssignment722);
            lv_variable_0=ruleVariable();
            _fsp--;


            	        if (current==null) {
            	            current = factory.create(grammarAccess.getAssignmentRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode.getParent(), current);
            	        }
            	        
            	        try {
            	       		set(current, "variable", lv_variable_0, "Variable", currentNode);
            	        } catch (ValueConverterException vce) {
            				handleValueConverterException(vce);
            	        }
            	        currentNode = currentNode.getParent();
            	    

            }

            match(input,17,FOLLOW_17_in_ruleAssignment735); 

                    createLeafNode(grammarAccess.getAssignmentAccess().getEqualsSignKeyword_1(), null); 
                
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:358:1: (lv_value_2= ruleValueItem )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:361:6: lv_value_2= ruleValueItem
            {
             
            	        currentNode=createCompositeNode(grammarAccess.getAssignmentAccess().getValueValueItemParserRuleCall_2_0(), currentNode); 
            	    
            pushFollow(FOLLOW_ruleValueItem_in_ruleAssignment769);
            lv_value_2=ruleValueItem();
            _fsp--;


            	        if (current==null) {
            	            current = factory.create(grammarAccess.getAssignmentRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode.getParent(), current);
            	        }
            	        
            	        try {
            	       		set(current, "value", lv_value_2, "ValueItem", currentNode);
            	        } catch (ValueConverterException vce) {
            				handleValueConverterException(vce);
            	        }
            	        currentNode = currentNode.getParent();
            	    

            }


            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleAssignment


    // $ANTLR start entryRulePrintStatement
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:386:1: entryRulePrintStatement returns [EObject current=null] : iv_rulePrintStatement= rulePrintStatement EOF ;
    public final EObject entryRulePrintStatement() throws RecognitionException {
        EObject current = null;

        EObject iv_rulePrintStatement = null;


        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:386:56: (iv_rulePrintStatement= rulePrintStatement EOF )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:387:2: iv_rulePrintStatement= rulePrintStatement EOF
            {
             currentNode = createCompositeNode(grammarAccess.getPrintStatementRule(), currentNode); 
            pushFollow(FOLLOW_rulePrintStatement_in_entryRulePrintStatement806);
            iv_rulePrintStatement=rulePrintStatement();
            _fsp--;

             current =iv_rulePrintStatement; 
            match(input,EOF,FOLLOW_EOF_in_entryRulePrintStatement816); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end entryRulePrintStatement


    // $ANTLR start rulePrintStatement
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:394:1: rulePrintStatement returns [EObject current=null] : ( 'print' (lv_value_1= ruleValueItem ) ) ;
    public final EObject rulePrintStatement() throws RecognitionException {
        EObject current = null;

        EObject lv_value_1 = null;


         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:399:6: ( ( 'print' (lv_value_1= ruleValueItem ) ) )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:400:1: ( 'print' (lv_value_1= ruleValueItem ) )
            {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:400:1: ( 'print' (lv_value_1= ruleValueItem ) )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:400:2: 'print' (lv_value_1= ruleValueItem )
            {
            match(input,18,FOLLOW_18_in_rulePrintStatement850); 

                    createLeafNode(grammarAccess.getPrintStatementAccess().getPrintKeyword_0(), null); 
                
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:404:1: (lv_value_1= ruleValueItem )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:407:6: lv_value_1= ruleValueItem
            {
             
            	        currentNode=createCompositeNode(grammarAccess.getPrintStatementAccess().getValueValueItemParserRuleCall_1_0(), currentNode); 
            	    
            pushFollow(FOLLOW_ruleValueItem_in_rulePrintStatement884);
            lv_value_1=ruleValueItem();
            _fsp--;


            	        if (current==null) {
            	            current = factory.create(grammarAccess.getPrintStatementRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode.getParent(), current);
            	        }
            	        
            	        try {
            	       		set(current, "value", lv_value_1, "ValueItem", currentNode);
            	        } catch (ValueConverterException vce) {
            				handleValueConverterException(vce);
            	        }
            	        currentNode = currentNode.getParent();
            	    

            }


            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end rulePrintStatement


    // $ANTLR start entryRuleInvocation
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:432:1: entryRuleInvocation returns [EObject current=null] : iv_ruleInvocation= ruleInvocation EOF ;
    public final EObject entryRuleInvocation() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleInvocation = null;


        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:432:52: (iv_ruleInvocation= ruleInvocation EOF )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:433:2: iv_ruleInvocation= ruleInvocation EOF
            {
             currentNode = createCompositeNode(grammarAccess.getInvocationRule(), currentNode); 
            pushFollow(FOLLOW_ruleInvocation_in_entryRuleInvocation921);
            iv_ruleInvocation=ruleInvocation();
            _fsp--;

             current =iv_ruleInvocation; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleInvocation931); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end entryRuleInvocation


    // $ANTLR start ruleInvocation
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:440:1: ruleInvocation returns [EObject current=null] : ( ( RULE_ID ) '(' ( (lv_parameters_2= ruleValueItem ) ( ',' (lv_parameters_4= ruleValueItem ) )* )? ')' ) ;
    public final EObject ruleInvocation() throws RecognitionException {
        EObject current = null;

        EObject lv_parameters_2 = null;

        EObject lv_parameters_4 = null;


         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:445:6: ( ( ( RULE_ID ) '(' ( (lv_parameters_2= ruleValueItem ) ( ',' (lv_parameters_4= ruleValueItem ) )* )? ')' ) )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:446:1: ( ( RULE_ID ) '(' ( (lv_parameters_2= ruleValueItem ) ( ',' (lv_parameters_4= ruleValueItem ) )* )? ')' )
            {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:446:1: ( ( RULE_ID ) '(' ( (lv_parameters_2= ruleValueItem ) ( ',' (lv_parameters_4= ruleValueItem ) )* )? ')' )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:446:2: ( RULE_ID ) '(' ( (lv_parameters_2= ruleValueItem ) ( ',' (lv_parameters_4= ruleValueItem ) )* )? ')'
            {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:446:2: ( RULE_ID )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:449:3: RULE_ID
            {

            			if (current==null) {
            	            current = factory.create(grammarAccess.getInvocationRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode, current);
            	        }
                    
            match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleInvocation978); 

            		createLeafNode(grammarAccess.getInvocationAccess().getMethodMethodCrossReference_0_0(), "method"); 
            	

            }

            match(input,12,FOLLOW_12_in_ruleInvocation990); 

                    createLeafNode(grammarAccess.getInvocationAccess().getLeftParenthesisKeyword_1(), null); 
                
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:466:1: ( (lv_parameters_2= ruleValueItem ) ( ',' (lv_parameters_4= ruleValueItem ) )* )?
            int alt8=2;
            int LA8_0 = input.LA(1);

            if ( ((LA8_0>=RULE_ID && LA8_0<=RULE_STRING)||LA8_0==12) ) {
                alt8=1;
            }
            switch (alt8) {
                case 1 :
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:466:2: (lv_parameters_2= ruleValueItem ) ( ',' (lv_parameters_4= ruleValueItem ) )*
                    {
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:466:2: (lv_parameters_2= ruleValueItem )
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:469:6: lv_parameters_2= ruleValueItem
                    {
                     
                    	        currentNode=createCompositeNode(grammarAccess.getInvocationAccess().getParametersValueItemParserRuleCall_2_0_0(), currentNode); 
                    	    
                    pushFollow(FOLLOW_ruleValueItem_in_ruleInvocation1025);
                    lv_parameters_2=ruleValueItem();
                    _fsp--;


                    	        if (current==null) {
                    	            current = factory.create(grammarAccess.getInvocationRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode.getParent(), current);
                    	        }
                    	        
                    	        try {
                    	       		add(current, "parameters", lv_parameters_2, "ValueItem", currentNode);
                    	        } catch (ValueConverterException vce) {
                    				handleValueConverterException(vce);
                    	        }
                    	        currentNode = currentNode.getParent();
                    	    

                    }

                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:487:2: ( ',' (lv_parameters_4= ruleValueItem ) )*
                    loop7:
                    do {
                        int alt7=2;
                        int LA7_0 = input.LA(1);

                        if ( (LA7_0==13) ) {
                            alt7=1;
                        }


                        switch (alt7) {
                    	case 1 :
                    	    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:487:3: ',' (lv_parameters_4= ruleValueItem )
                    	    {
                    	    match(input,13,FOLLOW_13_in_ruleInvocation1039); 

                    	            createLeafNode(grammarAccess.getInvocationAccess().getCommaKeyword_2_1_0(), null); 
                    	        
                    	    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:491:1: (lv_parameters_4= ruleValueItem )
                    	    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:494:6: lv_parameters_4= ruleValueItem
                    	    {
                    	     
                    	    	        currentNode=createCompositeNode(grammarAccess.getInvocationAccess().getParametersValueItemParserRuleCall_2_1_1_0(), currentNode); 
                    	    	    
                    	    pushFollow(FOLLOW_ruleValueItem_in_ruleInvocation1073);
                    	    lv_parameters_4=ruleValueItem();
                    	    _fsp--;


                    	    	        if (current==null) {
                    	    	            current = factory.create(grammarAccess.getInvocationRule().getType().getClassifier());
                    	    	            associateNodeWithAstElement(currentNode.getParent(), current);
                    	    	        }
                    	    	        
                    	    	        try {
                    	    	       		add(current, "parameters", lv_parameters_4, "ValueItem", currentNode);
                    	    	        } catch (ValueConverterException vce) {
                    	    				handleValueConverterException(vce);
                    	    	        }
                    	    	        currentNode = currentNode.getParent();
                    	    	    

                    	    }


                    	    }
                    	    break;

                    	default :
                    	    break loop7;
                        }
                    } while (true);


                    }
                    break;

            }

            match(input,14,FOLLOW_14_in_ruleInvocation1090); 

                    createLeafNode(grammarAccess.getInvocationAccess().getRightParenthesisKeyword_3(), null); 
                

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleInvocation


    // $ANTLR start entryRuleReturnStatement
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:523:1: entryRuleReturnStatement returns [EObject current=null] : iv_ruleReturnStatement= ruleReturnStatement EOF ;
    public final EObject entryRuleReturnStatement() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleReturnStatement = null;


        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:523:57: (iv_ruleReturnStatement= ruleReturnStatement EOF )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:524:2: iv_ruleReturnStatement= ruleReturnStatement EOF
            {
             currentNode = createCompositeNode(grammarAccess.getReturnStatementRule(), currentNode); 
            pushFollow(FOLLOW_ruleReturnStatement_in_entryRuleReturnStatement1123);
            iv_ruleReturnStatement=ruleReturnStatement();
            _fsp--;

             current =iv_ruleReturnStatement; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleReturnStatement1133); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end entryRuleReturnStatement


    // $ANTLR start ruleReturnStatement
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:531:1: ruleReturnStatement returns [EObject current=null] : ( 'return' (lv_value_1= ruleValueItem ) ) ;
    public final EObject ruleReturnStatement() throws RecognitionException {
        EObject current = null;

        EObject lv_value_1 = null;


         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:536:6: ( ( 'return' (lv_value_1= ruleValueItem ) ) )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:537:1: ( 'return' (lv_value_1= ruleValueItem ) )
            {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:537:1: ( 'return' (lv_value_1= ruleValueItem ) )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:537:2: 'return' (lv_value_1= ruleValueItem )
            {
            match(input,19,FOLLOW_19_in_ruleReturnStatement1167); 

                    createLeafNode(grammarAccess.getReturnStatementAccess().getReturnKeyword_0(), null); 
                
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:541:1: (lv_value_1= ruleValueItem )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:544:6: lv_value_1= ruleValueItem
            {
             
            	        currentNode=createCompositeNode(grammarAccess.getReturnStatementAccess().getValueValueItemParserRuleCall_1_0(), currentNode); 
            	    
            pushFollow(FOLLOW_ruleValueItem_in_ruleReturnStatement1201);
            lv_value_1=ruleValueItem();
            _fsp--;


            	        if (current==null) {
            	            current = factory.create(grammarAccess.getReturnStatementRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode.getParent(), current);
            	        }
            	        
            	        try {
            	       		set(current, "value", lv_value_1, "ValueItem", currentNode);
            	        } catch (ValueConverterException vce) {
            				handleValueConverterException(vce);
            	        }
            	        currentNode = currentNode.getParent();
            	    

            }


            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleReturnStatement


    // $ANTLR start entryRuleVariable
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:569:1: entryRuleVariable returns [EObject current=null] : iv_ruleVariable= ruleVariable EOF ;
    public final EObject entryRuleVariable() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleVariable = null;


        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:569:50: (iv_ruleVariable= ruleVariable EOF )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:570:2: iv_ruleVariable= ruleVariable EOF
            {
             currentNode = createCompositeNode(grammarAccess.getVariableRule(), currentNode); 
            pushFollow(FOLLOW_ruleVariable_in_entryRuleVariable1238);
            iv_ruleVariable=ruleVariable();
            _fsp--;

             current =iv_ruleVariable; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleVariable1248); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end entryRuleVariable


    // $ANTLR start ruleVariable
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:577:1: ruleVariable returns [EObject current=null] : (lv_name_0= RULE_ID ) ;
    public final EObject ruleVariable() throws RecognitionException {
        EObject current = null;

        Token lv_name_0=null;

         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:582:6: ( (lv_name_0= RULE_ID ) )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:583:1: (lv_name_0= RULE_ID )
            {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:583:1: (lv_name_0= RULE_ID )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:585:6: lv_name_0= RULE_ID
            {
            lv_name_0=(Token)input.LT(1);
            match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleVariable1294); 

            		createLeafNode(grammarAccess.getVariableAccess().getNameIDTerminalRuleCall_0(), "name"); 
            	

            	        if (current==null) {
            	            current = factory.create(grammarAccess.getVariableRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode, current);
            	        }
            	        
            	        try {
            	       		set(current, "name", lv_name_0, "ID", lastConsumedNode);
            	        } catch (ValueConverterException vce) {
            				handleValueConverterException(vce);
            	        }
            	    

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleVariable


    // $ANTLR start entryRuleVariableRef
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:610:1: entryRuleVariableRef returns [EObject current=null] : iv_ruleVariableRef= ruleVariableRef EOF ;
    public final EObject entryRuleVariableRef() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleVariableRef = null;


        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:610:53: (iv_ruleVariableRef= ruleVariableRef EOF )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:611:2: iv_ruleVariableRef= ruleVariableRef EOF
            {
             currentNode = createCompositeNode(grammarAccess.getVariableRefRule(), currentNode); 
            pushFollow(FOLLOW_ruleVariableRef_in_entryRuleVariableRef1334);
            iv_ruleVariableRef=ruleVariableRef();
            _fsp--;

             current =iv_ruleVariableRef; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleVariableRef1344); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end entryRuleVariableRef


    // $ANTLR start ruleVariableRef
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:618:1: ruleVariableRef returns [EObject current=null] : ( RULE_ID ) ;
    public final EObject ruleVariableRef() throws RecognitionException {
        EObject current = null;

         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:623:6: ( ( RULE_ID ) )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:624:1: ( RULE_ID )
            {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:624:1: ( RULE_ID )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:627:3: RULE_ID
            {

            			if (current==null) {
            	            current = factory.create(grammarAccess.getVariableRefRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode, current);
            	        }
                    
            match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleVariableRef1390); 

            		createLeafNode(grammarAccess.getVariableRefAccess().getVariableVariableCrossReference_0(), "variable"); 
            	

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleVariableRef


    // $ANTLR start entryRuleAddition
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:647:1: entryRuleAddition returns [EObject current=null] : iv_ruleAddition= ruleAddition EOF ;
    public final EObject entryRuleAddition() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleAddition = null;


        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:647:50: (iv_ruleAddition= ruleAddition EOF )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:648:2: iv_ruleAddition= ruleAddition EOF
            {
             currentNode = createCompositeNode(grammarAccess.getAdditionRule(), currentNode); 
            pushFollow(FOLLOW_ruleAddition_in_entryRuleAddition1425);
            iv_ruleAddition=ruleAddition();
            _fsp--;

             current =iv_ruleAddition; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleAddition1435); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end entryRuleAddition


    // $ANTLR start ruleAddition
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:655:1: ruleAddition returns [EObject current=null] : (this_Multiplication_0= ruleMultiplication ( () (lv_operator_2= ( '+' | '-' ) ) (lv_right_3= ruleAddition ) )? ) ;
    public final EObject ruleAddition() throws RecognitionException {
        EObject current = null;

        Token lv_operator_2=null;
        EObject this_Multiplication_0 = null;

        EObject lv_right_3 = null;


         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:660:6: ( (this_Multiplication_0= ruleMultiplication ( () (lv_operator_2= ( '+' | '-' ) ) (lv_right_3= ruleAddition ) )? ) )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:661:1: (this_Multiplication_0= ruleMultiplication ( () (lv_operator_2= ( '+' | '-' ) ) (lv_right_3= ruleAddition ) )? )
            {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:661:1: (this_Multiplication_0= ruleMultiplication ( () (lv_operator_2= ( '+' | '-' ) ) (lv_right_3= ruleAddition ) )? )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:662:5: this_Multiplication_0= ruleMultiplication ( () (lv_operator_2= ( '+' | '-' ) ) (lv_right_3= ruleAddition ) )?
            {
             
                    currentNode=createCompositeNode(grammarAccess.getAdditionAccess().getMultiplicationParserRuleCall_0(), currentNode); 
                
            pushFollow(FOLLOW_ruleMultiplication_in_ruleAddition1482);
            this_Multiplication_0=ruleMultiplication();
            _fsp--;

             
                    current = this_Multiplication_0; 
                    currentNode = currentNode.getParent();
                
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:670:1: ( () (lv_operator_2= ( '+' | '-' ) ) (lv_right_3= ruleAddition ) )?
            int alt10=2;
            int LA10_0 = input.LA(1);

            if ( ((LA10_0>=20 && LA10_0<=21)) ) {
                alt10=1;
            }
            switch (alt10) {
                case 1 :
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:670:2: () (lv_operator_2= ( '+' | '-' ) ) (lv_right_3= ruleAddition )
                    {
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:670:2: ()
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:671:5: 
                    {
                     
                            temp=factory.create(grammarAccess.getAdditionAccess().getOperationLeftAction_1_0().getType().getClassifier());
                            try {
                            	factory.set(temp, "left", current, null /*ParserRule*/, currentNode);
                            } catch(ValueConverterException vce) {
                            	handleValueConverterException(vce);
                            }
                            current = temp; 
                            temp = null;
                            CompositeNode newNode = createCompositeNode(grammarAccess.getAdditionAccess().getOperationLeftAction_1_0(), currentNode.getParent());
                        newNode.getChildren().add(currentNode);
                        moveLookaheadInfo(currentNode, newNode);
                        currentNode = newNode; 
                            associateNodeWithAstElement(currentNode, current); 
                        

                    }

                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:686:2: (lv_operator_2= ( '+' | '-' ) )
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:688:6: lv_operator_2= ( '+' | '-' )
                    {
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:688:20: ( '+' | '-' )
                    int alt9=2;
                    int LA9_0 = input.LA(1);

                    if ( (LA9_0==20) ) {
                        alt9=1;
                    }
                    else if ( (LA9_0==21) ) {
                        alt9=2;
                    }
                    else {
                        NoViableAltException nvae =
                            new NoViableAltException("688:20: ( '+' | '-' )", 9, 0, input);

                        throw nvae;
                    }
                    switch (alt9) {
                        case 1 :
                            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:688:21: '+'
                            {
                            match(input,20,FOLLOW_20_in_ruleAddition1513); 

                                    createLeafNode(grammarAccess.getAdditionAccess().getOperatorPlusSignKeyword_1_1_0_0(), "operator"); 
                                

                            }
                            break;
                        case 2 :
                            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:694:6: '-'
                            {
                            match(input,21,FOLLOW_21_in_ruleAddition1529); 

                                    createLeafNode(grammarAccess.getAdditionAccess().getOperatorHyphenMinusKeyword_1_1_0_1(), "operator"); 
                                

                            }
                            break;

                    }


                    	        if (current==null) {
                    	            current = factory.create(grammarAccess.getAdditionRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode, current);
                    	        }
                    	        
                    	        try {
                    	       		set(current, "operator", /* lv_operator_2 */ input.LT(-1), null, lastConsumedNode);
                    	        } catch (ValueConverterException vce) {
                    				handleValueConverterException(vce);
                    	        }
                    	    

                    }

                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:714:2: (lv_right_3= ruleAddition )
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:717:6: lv_right_3= ruleAddition
                    {
                     
                    	        currentNode=createCompositeNode(grammarAccess.getAdditionAccess().getRightAdditionParserRuleCall_1_2_0(), currentNode); 
                    	    
                    pushFollow(FOLLOW_ruleAddition_in_ruleAddition1578);
                    lv_right_3=ruleAddition();
                    _fsp--;


                    	        if (current==null) {
                    	            current = factory.create(grammarAccess.getAdditionRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode.getParent(), current);
                    	        }
                    	        
                    	        try {
                    	       		set(current, "right", lv_right_3, "Addition", currentNode);
                    	        } catch (ValueConverterException vce) {
                    				handleValueConverterException(vce);
                    	        }
                    	        currentNode = currentNode.getParent();
                    	    

                    }


                    }
                    break;

            }


            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleAddition


    // $ANTLR start entryRuleMultiplication
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:742:1: entryRuleMultiplication returns [EObject current=null] : iv_ruleMultiplication= ruleMultiplication EOF ;
    public final EObject entryRuleMultiplication() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleMultiplication = null;


        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:742:56: (iv_ruleMultiplication= ruleMultiplication EOF )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:743:2: iv_ruleMultiplication= ruleMultiplication EOF
            {
             currentNode = createCompositeNode(grammarAccess.getMultiplicationRule(), currentNode); 
            pushFollow(FOLLOW_ruleMultiplication_in_entryRuleMultiplication1617);
            iv_ruleMultiplication=ruleMultiplication();
            _fsp--;

             current =iv_ruleMultiplication; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleMultiplication1627); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end entryRuleMultiplication


    // $ANTLR start ruleMultiplication
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:750:1: ruleMultiplication returns [EObject current=null] : (this_Term_0= ruleTerm ( () (lv_operator_2= ( '*' | '/' ) ) (lv_right_3= ruleMultiplication ) )? ) ;
    public final EObject ruleMultiplication() throws RecognitionException {
        EObject current = null;

        Token lv_operator_2=null;
        EObject this_Term_0 = null;

        EObject lv_right_3 = null;


         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:755:6: ( (this_Term_0= ruleTerm ( () (lv_operator_2= ( '*' | '/' ) ) (lv_right_3= ruleMultiplication ) )? ) )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:756:1: (this_Term_0= ruleTerm ( () (lv_operator_2= ( '*' | '/' ) ) (lv_right_3= ruleMultiplication ) )? )
            {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:756:1: (this_Term_0= ruleTerm ( () (lv_operator_2= ( '*' | '/' ) ) (lv_right_3= ruleMultiplication ) )? )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:757:5: this_Term_0= ruleTerm ( () (lv_operator_2= ( '*' | '/' ) ) (lv_right_3= ruleMultiplication ) )?
            {
             
                    currentNode=createCompositeNode(grammarAccess.getMultiplicationAccess().getTermParserRuleCall_0(), currentNode); 
                
            pushFollow(FOLLOW_ruleTerm_in_ruleMultiplication1674);
            this_Term_0=ruleTerm();
            _fsp--;

             
                    current = this_Term_0; 
                    currentNode = currentNode.getParent();
                
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:765:1: ( () (lv_operator_2= ( '*' | '/' ) ) (lv_right_3= ruleMultiplication ) )?
            int alt12=2;
            int LA12_0 = input.LA(1);

            if ( ((LA12_0>=22 && LA12_0<=23)) ) {
                alt12=1;
            }
            switch (alt12) {
                case 1 :
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:765:2: () (lv_operator_2= ( '*' | '/' ) ) (lv_right_3= ruleMultiplication )
                    {
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:765:2: ()
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:766:5: 
                    {
                     
                            temp=factory.create(grammarAccess.getMultiplicationAccess().getOperationLeftAction_1_0().getType().getClassifier());
                            try {
                            	factory.set(temp, "left", current, null /*ParserRule*/, currentNode);
                            } catch(ValueConverterException vce) {
                            	handleValueConverterException(vce);
                            }
                            current = temp; 
                            temp = null;
                            CompositeNode newNode = createCompositeNode(grammarAccess.getMultiplicationAccess().getOperationLeftAction_1_0(), currentNode.getParent());
                        newNode.getChildren().add(currentNode);
                        moveLookaheadInfo(currentNode, newNode);
                        currentNode = newNode; 
                            associateNodeWithAstElement(currentNode, current); 
                        

                    }

                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:781:2: (lv_operator_2= ( '*' | '/' ) )
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:783:6: lv_operator_2= ( '*' | '/' )
                    {
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:783:20: ( '*' | '/' )
                    int alt11=2;
                    int LA11_0 = input.LA(1);

                    if ( (LA11_0==22) ) {
                        alt11=1;
                    }
                    else if ( (LA11_0==23) ) {
                        alt11=2;
                    }
                    else {
                        NoViableAltException nvae =
                            new NoViableAltException("783:20: ( '*' | '/' )", 11, 0, input);

                        throw nvae;
                    }
                    switch (alt11) {
                        case 1 :
                            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:783:21: '*'
                            {
                            match(input,22,FOLLOW_22_in_ruleMultiplication1705); 

                                    createLeafNode(grammarAccess.getMultiplicationAccess().getOperatorAsteriskKeyword_1_1_0_0(), "operator"); 
                                

                            }
                            break;
                        case 2 :
                            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:789:6: '/'
                            {
                            match(input,23,FOLLOW_23_in_ruleMultiplication1721); 

                                    createLeafNode(grammarAccess.getMultiplicationAccess().getOperatorSolidusKeyword_1_1_0_1(), "operator"); 
                                

                            }
                            break;

                    }


                    	        if (current==null) {
                    	            current = factory.create(grammarAccess.getMultiplicationRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode, current);
                    	        }
                    	        
                    	        try {
                    	       		set(current, "operator", /* lv_operator_2 */ input.LT(-1), null, lastConsumedNode);
                    	        } catch (ValueConverterException vce) {
                    				handleValueConverterException(vce);
                    	        }
                    	    

                    }

                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:809:2: (lv_right_3= ruleMultiplication )
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:812:6: lv_right_3= ruleMultiplication
                    {
                     
                    	        currentNode=createCompositeNode(grammarAccess.getMultiplicationAccess().getRightMultiplicationParserRuleCall_1_2_0(), currentNode); 
                    	    
                    pushFollow(FOLLOW_ruleMultiplication_in_ruleMultiplication1770);
                    lv_right_3=ruleMultiplication();
                    _fsp--;


                    	        if (current==null) {
                    	            current = factory.create(grammarAccess.getMultiplicationRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode.getParent(), current);
                    	        }
                    	        
                    	        try {
                    	       		set(current, "right", lv_right_3, "Multiplication", currentNode);
                    	        } catch (ValueConverterException vce) {
                    				handleValueConverterException(vce);
                    	        }
                    	        currentNode = currentNode.getParent();
                    	    

                    }


                    }
                    break;

            }


            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleMultiplication


    // $ANTLR start entryRuleTerm
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:837:1: entryRuleTerm returns [EObject current=null] : iv_ruleTerm= ruleTerm EOF ;
    public final EObject entryRuleTerm() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleTerm = null;


        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:837:46: (iv_ruleTerm= ruleTerm EOF )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:838:2: iv_ruleTerm= ruleTerm EOF
            {
             currentNode = createCompositeNode(grammarAccess.getTermRule(), currentNode); 
            pushFollow(FOLLOW_ruleTerm_in_entryRuleTerm1809);
            iv_ruleTerm=ruleTerm();
            _fsp--;

             current =iv_ruleTerm; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleTerm1819); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end entryRuleTerm


    // $ANTLR start ruleTerm
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:845:1: ruleTerm returns [EObject current=null] : (this_Atom_0= ruleAtom | this_ParaGroup_1= ruleParaGroup | this_VariableRef_2= ruleVariableRef | this_Invocation_3= ruleInvocation ) ;
    public final EObject ruleTerm() throws RecognitionException {
        EObject current = null;

        EObject this_Atom_0 = null;

        EObject this_ParaGroup_1 = null;

        EObject this_VariableRef_2 = null;

        EObject this_Invocation_3 = null;


         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:850:6: ( (this_Atom_0= ruleAtom | this_ParaGroup_1= ruleParaGroup | this_VariableRef_2= ruleVariableRef | this_Invocation_3= ruleInvocation ) )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:851:1: (this_Atom_0= ruleAtom | this_ParaGroup_1= ruleParaGroup | this_VariableRef_2= ruleVariableRef | this_Invocation_3= ruleInvocation )
            {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:851:1: (this_Atom_0= ruleAtom | this_ParaGroup_1= ruleParaGroup | this_VariableRef_2= ruleVariableRef | this_Invocation_3= ruleInvocation )
            int alt13=4;
            switch ( input.LA(1) ) {
            case RULE_INT:
            case RULE_TERM_DOUBLE:
                {
                alt13=1;
                }
                break;
            case 12:
                {
                alt13=2;
                }
                break;
            case RULE_ID:
                {
                int LA13_3 = input.LA(2);

                if ( (LA13_3==12) ) {
                    alt13=4;
                }
                else if ( (LA13_3==EOF||LA13_3==RULE_ID||(LA13_3>=13 && LA13_3<=14)||LA13_3==16||(LA13_3>=18 && LA13_3<=23)) ) {
                    alt13=3;
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("851:1: (this_Atom_0= ruleAtom | this_ParaGroup_1= ruleParaGroup | this_VariableRef_2= ruleVariableRef | this_Invocation_3= ruleInvocation )", 13, 3, input);

                    throw nvae;
                }
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("851:1: (this_Atom_0= ruleAtom | this_ParaGroup_1= ruleParaGroup | this_VariableRef_2= ruleVariableRef | this_Invocation_3= ruleInvocation )", 13, 0, input);

                throw nvae;
            }

            switch (alt13) {
                case 1 :
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:852:5: this_Atom_0= ruleAtom
                    {
                     
                            currentNode=createCompositeNode(grammarAccess.getTermAccess().getAtomParserRuleCall_0(), currentNode); 
                        
                    pushFollow(FOLLOW_ruleAtom_in_ruleTerm1866);
                    this_Atom_0=ruleAtom();
                    _fsp--;

                     
                            current = this_Atom_0; 
                            currentNode = currentNode.getParent();
                        

                    }
                    break;
                case 2 :
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:862:5: this_ParaGroup_1= ruleParaGroup
                    {
                     
                            currentNode=createCompositeNode(grammarAccess.getTermAccess().getParaGroupParserRuleCall_1(), currentNode); 
                        
                    pushFollow(FOLLOW_ruleParaGroup_in_ruleTerm1893);
                    this_ParaGroup_1=ruleParaGroup();
                    _fsp--;

                     
                            current = this_ParaGroup_1; 
                            currentNode = currentNode.getParent();
                        

                    }
                    break;
                case 3 :
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:872:5: this_VariableRef_2= ruleVariableRef
                    {
                     
                            currentNode=createCompositeNode(grammarAccess.getTermAccess().getVariableRefParserRuleCall_2(), currentNode); 
                        
                    pushFollow(FOLLOW_ruleVariableRef_in_ruleTerm1920);
                    this_VariableRef_2=ruleVariableRef();
                    _fsp--;

                     
                            current = this_VariableRef_2; 
                            currentNode = currentNode.getParent();
                        

                    }
                    break;
                case 4 :
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:882:5: this_Invocation_3= ruleInvocation
                    {
                     
                            currentNode=createCompositeNode(grammarAccess.getTermAccess().getInvocationParserRuleCall_3(), currentNode); 
                        
                    pushFollow(FOLLOW_ruleInvocation_in_ruleTerm1947);
                    this_Invocation_3=ruleInvocation();
                    _fsp--;

                     
                            current = this_Invocation_3; 
                            currentNode = currentNode.getParent();
                        

                    }
                    break;

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleTerm


    // $ANTLR start entryRuleAtom
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:897:1: entryRuleAtom returns [EObject current=null] : iv_ruleAtom= ruleAtom EOF ;
    public final EObject entryRuleAtom() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleAtom = null;


        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:897:46: (iv_ruleAtom= ruleAtom EOF )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:898:2: iv_ruleAtom= ruleAtom EOF
            {
             currentNode = createCompositeNode(grammarAccess.getAtomRule(), currentNode); 
            pushFollow(FOLLOW_ruleAtom_in_entryRuleAtom1979);
            iv_ruleAtom=ruleAtom();
            _fsp--;

             current =iv_ruleAtom; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleAtom1989); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end entryRuleAtom


    // $ANTLR start ruleAtom
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:905:1: ruleAtom returns [EObject current=null] : this_Number_0= ruleNumber ;
    public final EObject ruleAtom() throws RecognitionException {
        EObject current = null;

        EObject this_Number_0 = null;


         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:910:6: (this_Number_0= ruleNumber )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:912:5: this_Number_0= ruleNumber
            {
             
                    currentNode=createCompositeNode(grammarAccess.getAtomAccess().getNumberParserRuleCall(), currentNode); 
                
            pushFollow(FOLLOW_ruleNumber_in_ruleAtom2035);
            this_Number_0=ruleNumber();
            _fsp--;

             
                    current = this_Number_0; 
                    currentNode = currentNode.getParent();
                

            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleAtom


    // $ANTLR start entryRuleNumber
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:929:1: entryRuleNumber returns [EObject current=null] : iv_ruleNumber= ruleNumber EOF ;
    public final EObject entryRuleNumber() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleNumber = null;


        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:929:48: (iv_ruleNumber= ruleNumber EOF )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:930:2: iv_ruleNumber= ruleNumber EOF
            {
             currentNode = createCompositeNode(grammarAccess.getNumberRule(), currentNode); 
            pushFollow(FOLLOW_ruleNumber_in_entryRuleNumber2068);
            iv_ruleNumber=ruleNumber();
            _fsp--;

             current =iv_ruleNumber; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleNumber2078); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end entryRuleNumber


    // $ANTLR start ruleNumber
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:937:1: ruleNumber returns [EObject current=null] : (this_NumInteger_0= ruleNumInteger | this_NumDouble_1= ruleNumDouble ) ;
    public final EObject ruleNumber() throws RecognitionException {
        EObject current = null;

        EObject this_NumInteger_0 = null;

        EObject this_NumDouble_1 = null;


         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:942:6: ( (this_NumInteger_0= ruleNumInteger | this_NumDouble_1= ruleNumDouble ) )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:943:1: (this_NumInteger_0= ruleNumInteger | this_NumDouble_1= ruleNumDouble )
            {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:943:1: (this_NumInteger_0= ruleNumInteger | this_NumDouble_1= ruleNumDouble )
            int alt14=2;
            int LA14_0 = input.LA(1);

            if ( (LA14_0==RULE_INT) ) {
                alt14=1;
            }
            else if ( (LA14_0==RULE_TERM_DOUBLE) ) {
                alt14=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("943:1: (this_NumInteger_0= ruleNumInteger | this_NumDouble_1= ruleNumDouble )", 14, 0, input);

                throw nvae;
            }
            switch (alt14) {
                case 1 :
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:944:5: this_NumInteger_0= ruleNumInteger
                    {
                     
                            currentNode=createCompositeNode(grammarAccess.getNumberAccess().getNumIntegerParserRuleCall_0(), currentNode); 
                        
                    pushFollow(FOLLOW_ruleNumInteger_in_ruleNumber2125);
                    this_NumInteger_0=ruleNumInteger();
                    _fsp--;

                     
                            current = this_NumInteger_0; 
                            currentNode = currentNode.getParent();
                        

                    }
                    break;
                case 2 :
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:954:5: this_NumDouble_1= ruleNumDouble
                    {
                     
                            currentNode=createCompositeNode(grammarAccess.getNumberAccess().getNumDoubleParserRuleCall_1(), currentNode); 
                        
                    pushFollow(FOLLOW_ruleNumDouble_in_ruleNumber2152);
                    this_NumDouble_1=ruleNumDouble();
                    _fsp--;

                     
                            current = this_NumDouble_1; 
                            currentNode = currentNode.getParent();
                        

                    }
                    break;

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleNumber


    // $ANTLR start entryRuleNumInteger
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:969:1: entryRuleNumInteger returns [EObject current=null] : iv_ruleNumInteger= ruleNumInteger EOF ;
    public final EObject entryRuleNumInteger() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleNumInteger = null;


        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:969:52: (iv_ruleNumInteger= ruleNumInteger EOF )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:970:2: iv_ruleNumInteger= ruleNumInteger EOF
            {
             currentNode = createCompositeNode(grammarAccess.getNumIntegerRule(), currentNode); 
            pushFollow(FOLLOW_ruleNumInteger_in_entryRuleNumInteger2184);
            iv_ruleNumInteger=ruleNumInteger();
            _fsp--;

             current =iv_ruleNumInteger; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleNumInteger2194); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end entryRuleNumInteger


    // $ANTLR start ruleNumInteger
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:977:1: ruleNumInteger returns [EObject current=null] : (lv_value_0= RULE_INT ) ;
    public final EObject ruleNumInteger() throws RecognitionException {
        EObject current = null;

        Token lv_value_0=null;

         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:982:6: ( (lv_value_0= RULE_INT ) )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:983:1: (lv_value_0= RULE_INT )
            {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:983:1: (lv_value_0= RULE_INT )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:985:6: lv_value_0= RULE_INT
            {
            lv_value_0=(Token)input.LT(1);
            match(input,RULE_INT,FOLLOW_RULE_INT_in_ruleNumInteger2240); 

            		createLeafNode(grammarAccess.getNumIntegerAccess().getValueINTTerminalRuleCall_0(), "value"); 
            	

            	        if (current==null) {
            	            current = factory.create(grammarAccess.getNumIntegerRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode, current);
            	        }
            	        
            	        try {
            	       		set(current, "value", lv_value_0, "INT", lastConsumedNode);
            	        } catch (ValueConverterException vce) {
            				handleValueConverterException(vce);
            	        }
            	    

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleNumInteger


    // $ANTLR start entryRuleNumDouble
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1010:1: entryRuleNumDouble returns [EObject current=null] : iv_ruleNumDouble= ruleNumDouble EOF ;
    public final EObject entryRuleNumDouble() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleNumDouble = null;


        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1010:51: (iv_ruleNumDouble= ruleNumDouble EOF )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1011:2: iv_ruleNumDouble= ruleNumDouble EOF
            {
             currentNode = createCompositeNode(grammarAccess.getNumDoubleRule(), currentNode); 
            pushFollow(FOLLOW_ruleNumDouble_in_entryRuleNumDouble2280);
            iv_ruleNumDouble=ruleNumDouble();
            _fsp--;

             current =iv_ruleNumDouble; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleNumDouble2290); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end entryRuleNumDouble


    // $ANTLR start ruleNumDouble
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1018:1: ruleNumDouble returns [EObject current=null] : (lv_value_0= RULE_TERM_DOUBLE ) ;
    public final EObject ruleNumDouble() throws RecognitionException {
        EObject current = null;

        Token lv_value_0=null;

         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1023:6: ( (lv_value_0= RULE_TERM_DOUBLE ) )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1024:1: (lv_value_0= RULE_TERM_DOUBLE )
            {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1024:1: (lv_value_0= RULE_TERM_DOUBLE )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1026:6: lv_value_0= RULE_TERM_DOUBLE
            {
            lv_value_0=(Token)input.LT(1);
            match(input,RULE_TERM_DOUBLE,FOLLOW_RULE_TERM_DOUBLE_in_ruleNumDouble2336); 

            		createLeafNode(grammarAccess.getNumDoubleAccess().getValueTERM_DOUBLETerminalRuleCall_0(), "value"); 
            	

            	        if (current==null) {
            	            current = factory.create(grammarAccess.getNumDoubleRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode, current);
            	        }
            	        
            	        try {
            	       		set(current, "value", lv_value_0, "TERM_DOUBLE", lastConsumedNode);
            	        } catch (ValueConverterException vce) {
            				handleValueConverterException(vce);
            	        }
            	    

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleNumDouble


    // $ANTLR start entryRuleParaGroup
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1051:1: entryRuleParaGroup returns [EObject current=null] : iv_ruleParaGroup= ruleParaGroup EOF ;
    public final EObject entryRuleParaGroup() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleParaGroup = null;


        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1051:51: (iv_ruleParaGroup= ruleParaGroup EOF )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1052:2: iv_ruleParaGroup= ruleParaGroup EOF
            {
             currentNode = createCompositeNode(grammarAccess.getParaGroupRule(), currentNode); 
            pushFollow(FOLLOW_ruleParaGroup_in_entryRuleParaGroup2376);
            iv_ruleParaGroup=ruleParaGroup();
            _fsp--;

             current =iv_ruleParaGroup; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleParaGroup2386); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end entryRuleParaGroup


    // $ANTLR start ruleParaGroup
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1059:1: ruleParaGroup returns [EObject current=null] : ( '(' (lv_value_1= ruleAddition ) ')' ) ;
    public final EObject ruleParaGroup() throws RecognitionException {
        EObject current = null;

        EObject lv_value_1 = null;


         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1064:6: ( ( '(' (lv_value_1= ruleAddition ) ')' ) )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1065:1: ( '(' (lv_value_1= ruleAddition ) ')' )
            {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1065:1: ( '(' (lv_value_1= ruleAddition ) ')' )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1065:2: '(' (lv_value_1= ruleAddition ) ')'
            {
            match(input,12,FOLLOW_12_in_ruleParaGroup2420); 

                    createLeafNode(grammarAccess.getParaGroupAccess().getLeftParenthesisKeyword_0(), null); 
                
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1069:1: (lv_value_1= ruleAddition )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1072:6: lv_value_1= ruleAddition
            {
             
            	        currentNode=createCompositeNode(grammarAccess.getParaGroupAccess().getValueAdditionParserRuleCall_1_0(), currentNode); 
            	    
            pushFollow(FOLLOW_ruleAddition_in_ruleParaGroup2454);
            lv_value_1=ruleAddition();
            _fsp--;


            	        if (current==null) {
            	            current = factory.create(grammarAccess.getParaGroupRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode.getParent(), current);
            	        }
            	        
            	        try {
            	       		set(current, "value", lv_value_1, "Addition", currentNode);
            	        } catch (ValueConverterException vce) {
            				handleValueConverterException(vce);
            	        }
            	        currentNode = currentNode.getParent();
            	    

            }

            match(input,14,FOLLOW_14_in_ruleParaGroup2467); 

                    createLeafNode(grammarAccess.getParaGroupAccess().getRightParenthesisKeyword_2(), null); 
                

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleParaGroup


    // $ANTLR start entryRuleValueItem
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1101:1: entryRuleValueItem returns [EObject current=null] : iv_ruleValueItem= ruleValueItem EOF ;
    public final EObject entryRuleValueItem() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleValueItem = null;


        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1101:51: (iv_ruleValueItem= ruleValueItem EOF )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1102:2: iv_ruleValueItem= ruleValueItem EOF
            {
             currentNode = createCompositeNode(grammarAccess.getValueItemRule(), currentNode); 
            pushFollow(FOLLOW_ruleValueItem_in_entryRuleValueItem2500);
            iv_ruleValueItem=ruleValueItem();
            _fsp--;

             current =iv_ruleValueItem; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleValueItem2510); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end entryRuleValueItem


    // $ANTLR start ruleValueItem
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1109:1: ruleValueItem returns [EObject current=null] : (this_Literal_0= ruleLiteral | this_Addition_1= ruleAddition ) ;
    public final EObject ruleValueItem() throws RecognitionException {
        EObject current = null;

        EObject this_Literal_0 = null;

        EObject this_Addition_1 = null;


         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1114:6: ( (this_Literal_0= ruleLiteral | this_Addition_1= ruleAddition ) )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1115:1: (this_Literal_0= ruleLiteral | this_Addition_1= ruleAddition )
            {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1115:1: (this_Literal_0= ruleLiteral | this_Addition_1= ruleAddition )
            int alt15=2;
            int LA15_0 = input.LA(1);

            if ( (LA15_0==RULE_STRING) ) {
                alt15=1;
            }
            else if ( ((LA15_0>=RULE_ID && LA15_0<=RULE_TERM_DOUBLE)||LA15_0==12) ) {
                alt15=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("1115:1: (this_Literal_0= ruleLiteral | this_Addition_1= ruleAddition )", 15, 0, input);

                throw nvae;
            }
            switch (alt15) {
                case 1 :
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1116:5: this_Literal_0= ruleLiteral
                    {
                     
                            currentNode=createCompositeNode(grammarAccess.getValueItemAccess().getLiteralParserRuleCall_0(), currentNode); 
                        
                    pushFollow(FOLLOW_ruleLiteral_in_ruleValueItem2557);
                    this_Literal_0=ruleLiteral();
                    _fsp--;

                     
                            current = this_Literal_0; 
                            currentNode = currentNode.getParent();
                        

                    }
                    break;
                case 2 :
                    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1126:5: this_Addition_1= ruleAddition
                    {
                     
                            currentNode=createCompositeNode(grammarAccess.getValueItemAccess().getAdditionParserRuleCall_1(), currentNode); 
                        
                    pushFollow(FOLLOW_ruleAddition_in_ruleValueItem2584);
                    this_Addition_1=ruleAddition();
                    _fsp--;

                     
                            current = this_Addition_1; 
                            currentNode = currentNode.getParent();
                        

                    }
                    break;

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleValueItem


    // $ANTLR start entryRuleLiteral
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1141:1: entryRuleLiteral returns [EObject current=null] : iv_ruleLiteral= ruleLiteral EOF ;
    public final EObject entryRuleLiteral() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleLiteral = null;


        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1141:49: (iv_ruleLiteral= ruleLiteral EOF )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1142:2: iv_ruleLiteral= ruleLiteral EOF
            {
             currentNode = createCompositeNode(grammarAccess.getLiteralRule(), currentNode); 
            pushFollow(FOLLOW_ruleLiteral_in_entryRuleLiteral2616);
            iv_ruleLiteral=ruleLiteral();
            _fsp--;

             current =iv_ruleLiteral; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleLiteral2626); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end entryRuleLiteral


    // $ANTLR start ruleLiteral
    // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1149:1: ruleLiteral returns [EObject current=null] : (lv_value_0= RULE_STRING ) ;
    public final EObject ruleLiteral() throws RecognitionException {
        EObject current = null;

        Token lv_value_0=null;

         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1154:6: ( (lv_value_0= RULE_STRING ) )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1155:1: (lv_value_0= RULE_STRING )
            {
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1155:1: (lv_value_0= RULE_STRING )
            // ../org.xmdl.silk/src-gen/org/xmdl/parser/antlr/internal/InternalSilk.g:1157:6: lv_value_0= RULE_STRING
            {
            lv_value_0=(Token)input.LT(1);
            match(input,RULE_STRING,FOLLOW_RULE_STRING_in_ruleLiteral2672); 

            		createLeafNode(grammarAccess.getLiteralAccess().getValueSTRINGTerminalRuleCall_0(), "value"); 
            	

            	        if (current==null) {
            	            current = factory.create(grammarAccess.getLiteralRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode, current);
            	        }
            	        
            	        try {
            	       		set(current, "value", lv_value_0, "STRING", lastConsumedNode);
            	        } catch (ValueConverterException vce) {
            				handleValueConverterException(vce);
            	        }
            	    

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleLiteral


    protected DFA1 dfa1 = new DFA1(this);
    static final String DFA1_eotS =
        "\11\uffff";
    static final String DFA1_eofS =
        "\1\2\4\uffff\1\2\3\uffff";
    static final String DFA1_minS =
        "\1\4\1\14\1\uffff\1\4\1\14\2\4\1\uffff\1\14";
    static final String DFA1_maxS =
        "\1\23\1\21\1\uffff\1\16\1\27\1\23\1\14\1\uffff\1\27";
    static final String DFA1_acceptS =
        "\2\uffff\1\2\4\uffff\1\1\1\uffff";
    static final String DFA1_specialS =
        "\11\uffff}>";
    static final String[] DFA1_transitionS = {
            "\1\1\15\uffff\2\2",
            "\1\3\4\uffff\1\2",
            "",
            "\1\4\3\2\4\uffff\1\2\1\uffff\1\5",
            "\1\2\1\6\1\5\5\uffff\4\2",
            "\1\2\12\uffff\1\7\2\uffff\2\2",
            "\1\10\3\2\4\uffff\1\2",
            "",
            "\1\2\1\6\1\5\5\uffff\4\2"
    };

    static final short[] DFA1_eot = DFA.unpackEncodedString(DFA1_eotS);
    static final short[] DFA1_eof = DFA.unpackEncodedString(DFA1_eofS);
    static final char[] DFA1_min = DFA.unpackEncodedStringToUnsignedChars(DFA1_minS);
    static final char[] DFA1_max = DFA.unpackEncodedStringToUnsignedChars(DFA1_maxS);
    static final short[] DFA1_accept = DFA.unpackEncodedString(DFA1_acceptS);
    static final short[] DFA1_special = DFA.unpackEncodedString(DFA1_specialS);
    static final short[][] DFA1_transition;

    static {
        int numStates = DFA1_transitionS.length;
        DFA1_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA1_transition[i] = DFA.unpackEncodedString(DFA1_transitionS[i]);
        }
    }

    class DFA1 extends DFA {

        public DFA1(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 1;
            this.eot = DFA1_eot;
            this.eof = DFA1_eof;
            this.min = DFA1_min;
            this.max = DFA1_max;
            this.accept = DFA1_accept;
            this.special = DFA1_special;
            this.transition = DFA1_transition;
        }
        public String getDescription() {
            return "()* loopback of 86:2: (lv_methods_0= ruleMethod )*";
        }
    }
 

    public static final BitSet FOLLOW_ruleProgram_in_entryRuleProgram73 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleProgram83 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleMethod_in_ruleProgram142 = new BitSet(new long[]{0x00000000000C0012L});
    public static final BitSet FOLLOW_ruleStatement_in_ruleProgram181 = new BitSet(new long[]{0x00000000000C0012L});
    public static final BitSet FOLLOW_ruleMethod_in_entryRuleMethod219 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleMethod229 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleMethod276 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_12_in_ruleMethod293 = new BitSet(new long[]{0x0000000000004010L});
    public static final BitSet FOLLOW_ruleVariable_in_ruleMethod328 = new BitSet(new long[]{0x0000000000006000L});
    public static final BitSet FOLLOW_13_in_ruleMethod342 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_ruleVariable_in_ruleMethod376 = new BitSet(new long[]{0x0000000000006000L});
    public static final BitSet FOLLOW_14_in_ruleMethod393 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_ruleMethod402 = new BitSet(new long[]{0x00000000000D0010L});
    public static final BitSet FOLLOW_ruleStatement_in_ruleMethod436 = new BitSet(new long[]{0x00000000000D0010L});
    public static final BitSet FOLLOW_16_in_ruleMethod450 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleStatement_in_entryRuleStatement483 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleStatement493 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleAssignment_in_ruleStatement540 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_rulePrintStatement_in_ruleStatement567 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleInvocation_in_ruleStatement594 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleReturnStatement_in_ruleStatement621 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleAssignment_in_entryRuleAssignment653 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleAssignment663 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleVariable_in_ruleAssignment722 = new BitSet(new long[]{0x0000000000020000L});
    public static final BitSet FOLLOW_17_in_ruleAssignment735 = new BitSet(new long[]{0x00000000000010F0L});
    public static final BitSet FOLLOW_ruleValueItem_in_ruleAssignment769 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_rulePrintStatement_in_entryRulePrintStatement806 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRulePrintStatement816 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_18_in_rulePrintStatement850 = new BitSet(new long[]{0x00000000000010F0L});
    public static final BitSet FOLLOW_ruleValueItem_in_rulePrintStatement884 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleInvocation_in_entryRuleInvocation921 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleInvocation931 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleInvocation978 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_12_in_ruleInvocation990 = new BitSet(new long[]{0x00000000000050F0L});
    public static final BitSet FOLLOW_ruleValueItem_in_ruleInvocation1025 = new BitSet(new long[]{0x0000000000006000L});
    public static final BitSet FOLLOW_13_in_ruleInvocation1039 = new BitSet(new long[]{0x00000000000010F0L});
    public static final BitSet FOLLOW_ruleValueItem_in_ruleInvocation1073 = new BitSet(new long[]{0x0000000000006000L});
    public static final BitSet FOLLOW_14_in_ruleInvocation1090 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleReturnStatement_in_entryRuleReturnStatement1123 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleReturnStatement1133 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_19_in_ruleReturnStatement1167 = new BitSet(new long[]{0x00000000000010F0L});
    public static final BitSet FOLLOW_ruleValueItem_in_ruleReturnStatement1201 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleVariable_in_entryRuleVariable1238 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleVariable1248 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleVariable1294 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleVariableRef_in_entryRuleVariableRef1334 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleVariableRef1344 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleVariableRef1390 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleAddition_in_entryRuleAddition1425 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleAddition1435 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleMultiplication_in_ruleAddition1482 = new BitSet(new long[]{0x0000000000300002L});
    public static final BitSet FOLLOW_20_in_ruleAddition1513 = new BitSet(new long[]{0x0000000000001070L});
    public static final BitSet FOLLOW_21_in_ruleAddition1529 = new BitSet(new long[]{0x0000000000001070L});
    public static final BitSet FOLLOW_ruleAddition_in_ruleAddition1578 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleMultiplication_in_entryRuleMultiplication1617 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleMultiplication1627 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleTerm_in_ruleMultiplication1674 = new BitSet(new long[]{0x0000000000C00002L});
    public static final BitSet FOLLOW_22_in_ruleMultiplication1705 = new BitSet(new long[]{0x0000000000001070L});
    public static final BitSet FOLLOW_23_in_ruleMultiplication1721 = new BitSet(new long[]{0x0000000000001070L});
    public static final BitSet FOLLOW_ruleMultiplication_in_ruleMultiplication1770 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleTerm_in_entryRuleTerm1809 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleTerm1819 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleAtom_in_ruleTerm1866 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleParaGroup_in_ruleTerm1893 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleVariableRef_in_ruleTerm1920 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleInvocation_in_ruleTerm1947 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleAtom_in_entryRuleAtom1979 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleAtom1989 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleNumber_in_ruleAtom2035 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleNumber_in_entryRuleNumber2068 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleNumber2078 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleNumInteger_in_ruleNumber2125 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleNumDouble_in_ruleNumber2152 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleNumInteger_in_entryRuleNumInteger2184 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleNumInteger2194 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_RULE_INT_in_ruleNumInteger2240 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleNumDouble_in_entryRuleNumDouble2280 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleNumDouble2290 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_RULE_TERM_DOUBLE_in_ruleNumDouble2336 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleParaGroup_in_entryRuleParaGroup2376 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleParaGroup2386 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_12_in_ruleParaGroup2420 = new BitSet(new long[]{0x0000000000001070L});
    public static final BitSet FOLLOW_ruleAddition_in_ruleParaGroup2454 = new BitSet(new long[]{0x0000000000004000L});
    public static final BitSet FOLLOW_14_in_ruleParaGroup2467 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleValueItem_in_entryRuleValueItem2500 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleValueItem2510 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleLiteral_in_ruleValueItem2557 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleAddition_in_ruleValueItem2584 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleLiteral_in_entryRuleLiteral2616 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleLiteral2626 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_RULE_STRING_in_ruleLiteral2672 = new BitSet(new long[]{0x0000000000000002L});

}